package com.ap.core.validation.message.rules;

import com.ap.core.common.types.MessageStatus;
import com.ap.core.message.managepayment.info.ConfirmPaymentRequestMessageInfo;
import com.ap.core.validation.message.info.MessageValidationInfo;
import com.ap.core.validation.message.info.RTPOriginalInfoForConfirmPayment;
import com.ap.core.validation.rules.AbstractValidationRule;

/**
 * User: Rohit.Dixit
 */
public class SV0002Rule extends AbstractValidationRule<MessageValidationInfo<ConfirmPaymentRequestMessageInfo, RTPOriginalInfoForConfirmPayment>> {


    @Override
    public boolean validate(MessageValidationInfo<ConfirmPaymentRequestMessageInfo, RTPOriginalInfoForConfirmPayment> infoObject) {
    		 return infoObject.getOriginalInfo().isOrderPaymentExists(MessageStatus.AWAITING_PAYMENT_CONFIRMATION);
    }


}
